<template>
	<view class="indexPage">
		<!-- 顶部 -->
		<view class="part1">
			<!-- 头像 -->
			<image  class="pfp" src="../../static/img/logo.png"></image>
			<!-- 输入框 -->
			<view class="input" @click="gotoSearch()">
				<image src="../../static/img/搜索小.png"></image>
				<input placeholder="请输入关键字搜索" />
			</view>
			<!-- 定位 -->
			<view class="locate">
				<text>上海</text>
				<image src="../../static/img/定位图标.svg"></image>
			</view>
		</view>
		<!-- 广告区 -->
		<view class="adv">
			<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
				<swiper-item>
					<view class="adv-item"><image src="../../static/img/jd1.png" mode="aspectFill"></image></view>
				</swiper-item>
				<swiper-item>
					<view class="adv-item"><image src="../../static/img/jd2.png" mode="aspectFill"></image></view>
				</swiper-item>
			</swiper>
		</view>
		<!-- 推荐 -->
		<view class="home-invitation">
			<navitation></navitation>
		</view>
	</view>
</template>

<script>
	import navitation from '../../components/invitation.vue'
	export default {
		data() {
			return {
				
			}
		},
		components:{
			navitation,
		},
		methods: {
			gotoSearch() {
				uni.navigateTo({
					url:'../indexSearch/indexSearch'
				})
			}
		},
		
	}
</script>

<style>
/*  头像  */
.pfp{
	width: 10%;
	height: 80rpx;
	border-radius:40rpx;
}
/* 定位 */
.locate{
	display: flex;
	margin-left: 50rpx;
	align-items: center;
}
/* 定位图标 */
.locate image{
	width: 30rpx;
	height: 30rpx;
}
/*  顶部 */
.part1{
	position: fixed;
	top: 0;
	width: 100%;
	height: 80rpx;
	display: flex;
	margin-top: 5rpx;
	align-items: center;
	background-color: skyblue;
}
/* 输入框 */
.input{
	width: 65%;
	height: 70rpx;
	display: flex;
	margin-left: 30rpx;
	padding-top: 15rpx;
	border: 1rpx solid #cccccc;
}
.input image{
	width: 25px;
	height: 25px;
	margin-right: 10rpx;
	margin-left: 10rpx;
}
.adv {
	margin-top: 80rpx;
}
swiper {
	height: 450rpx;
}
.adv-item{
	    height: 450rpx;
		margin-top: 30rpx;
}
.adv-item image {
		width: 100%;
		height: 450rpx;
}
.home-invitation{
	margin-top: 30rpx;
}
</style>
